# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-pure-sasl
pkgver=0.6.2
pkgrel=5
pkgdesc="Pure Python client SASL implementation"
url="https://github.com/thobbs/pure-sasl"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-setuptools')
optdepends=('python-kerberos: for GSSAPI support')
checkdepends=('python-mock' 'python-nose' 'python-pykerberos')
source=("https://github.com/thobbs/pure-sasl/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('e4ac40822014dec0522faf25f0806cd5cb1053fa7c5362fd3569f79f43ac775aa1a7895421699d36713e0493ebfc7215da0bca9fee516e07b4ef1e182684d4bb')

build() {
  cd pure-sasl-$pkgver
  python setup.py build
}

check() {
  cd pure-sasl-$pkgver
  nosetests3
}

package() {
  cd pure-sasl-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
